package com.yoke.controller;

import com.yoke.common.JsonMessage;
import com.yoke.common.base.NginxBaseControl;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by jiangzeyin on 2017/5/10.
 */
@Controller
public class IndexControl extends NginxBaseControl {

    @RequestMapping(value = {"index.html", "", "/"}, produces = MediaType.TEXT_HTML_VALUE)
    public String index() {
        return "index";
    }

    @RequestMapping(value = "error_s", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    @ResponseBody
    public String error_s() {
        return JsonMessage.getString(900, "service error");
    }
}
